package com.lantosec.hmrp.modules.sysdata.entity;

import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.sysdata.vo.SysProcessPublicityVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 流程公示表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-07-07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysProcessPublicity extends BaseEntity<SysProcessPublicityVO> {

    private static final long serialVersionUID = 1L;
    public SysProcessPublicity(SysProcessPublicityVO vo){
        this.id = vo.getId();
        this.proInsId = vo.getProInsId();
        this.taskId = vo.getTaskId();
        this.dataId = vo.getDataId();
        this.layoutId = vo.getLayoutId();
        this.userId = vo.getUserId();
        this.createTime = vo.getCreateTime();
    }

    @Override
    public SysProcessPublicityVO convertToVO(){
        return new SysProcessPublicityVO(this);
    }


    /**
     * Id
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 流程实例Id
     */
    private String proInsId;

    /**
     * 任务Id
     */
    private String taskId;

    /**
     * 数据Id
     */
    private String dataId;

    /**
     * 表单布局Id
     */
    private String layoutId;

    /**
     * 操作用户Id
     */
    private String userId;

    /**
     * 创建时间
     */
    private Date createTime;


    public enum ColName {
        id, pro_ins_id, task_id, data_id, layout_id, user_id, create_time,
    }
}
